<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport"
          content="width=device-width, initial-scale=1.0, maximum-scale=1.0,user-scalable=no,minimal-ui">
    <title>淘淘商城</title>
    <link rel="icon" href="../../style/images/logo.png">
    <!--element-ui的样式-->
    <link rel="stylesheet" href="../../style/common.css"/>
    <link rel="stylesheet" href="../../element-ui/index.css"/>
</head>
<body>
<div id="app">
    <div class="block">
        <span class="demonstration">默认 click 触发子菜单</span>
        <el-cascader
                placeholder="选择地址"
                v-model="value"
                :props="{ checkStrictly: true }"
                :options="province"
                @change="handleChange"></el-cascader>
    </div>
</div>
<script src="../../js/vue.js"></script>
<script src="../../element-ui/index.js"></script>
<!-- 引入axios -->
<script src="../../js/axios.min.js"></script>
<script src="../../js/frontInterceptors.js"></script>
<script src="../../js/common.js"></script>
<script>
    new Vue({
        el: "#app",
        data() {
            return {
                value: [],
                province: [],
            }
        },
        computed: {

        },
        created() {
            this.getProvince()

        },
        methods: {
            async getProvince(){
                const  {data : res}  =  await axios.get(`/district/list/${86}`)
                this.province = res.data
                console.log(this.value)
            },

            handleChange(value) {
                console.log(value);
            }
        },
        mounted() {
        }
    })
</script>
</body>
</html>